<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<TITLE>Thống kê</TITLE>
	<style>
.item3 {
	background: #015AC3 !important;
}
</style>
</h:head>
<h:body>
	<ui:include src="admin_header.xhtml"></ui:include>

	<div class="main">
		<p:growl id="msgg"></p:growl>
		
		<h:form>
			<p:poll interval="5" listener="#{adminBean.loadChart}"
				update=":chart_panel" />
		</h:form>
		<h:panelGroup id="chart_panel">
			<div class="infor-slice">
				<p:outputLabel
					value="Số url chưa lấy nội dung: #{adminBean.totalUrl-adminBean.totalUrlHasContent}"></p:outputLabel>
				<div class="slice-color" style="background: #4BB2C5;"></div>
				<p:outputLabel
					value="Số url đã lấy nội dung: #{adminBean.totalUrlHasContent}"></p:outputLabel>
				<div class="slice-color" style="background: #EAA228;"></div>
				<p:outputLabel
					value="Số url bị lỗi: #{adminBean.totalUrlError}"></p:outputLabel>
				<div class="slice-color" style="background: #C5B47F;"></div>
				<p:outputLabel
					value="Số url bị xóa: #{adminBean.totalUrlRemoved}"></p:outputLabel>
				<div class="slice-color" style="background: #579575;"></div>
			</div>
			<p:pieChart title="Biểu đồ trạng thái url" showDataLabels="true" value="#{adminBean.chartModel}"
				style="width:400px;margin-top:20px;float:left;" />
			<div class="infor-slice"
				style="border-top: 1px solid #e8e8e8; padding-top: 10px;">
				<p:outputLabel
					value="Số url đã lấy nội dung như chưa  đánh chỉ mục #{adminBean.totalUrlHasContent-adminBean.totalUrlIndexed}"></p:outputLabel>
				<div class="slice-color" style="background: #66CC66;"></div>
				<p:outputLabel
					value="Số url đã đánh chỉ mục: #{adminBean.totalUrlIndexed}"></p:outputLabel>
				<div class="slice-color" style="background: #93B75F;"></div>
			</div>
			<p:pieChart title="Biểu đồ trạng thái chỉ mục" showDataLabels="true" value="#{adminBean.chartModel2}"
				seriesColors="66cc66, 93b75f, E7E658, cc6666"
				style="width:400px;margin-top:20px;float:left;" />
		</h:panelGroup>
	</div>
	<ui:include src="template/footer.xhtml"></ui:include>
</h:body>
</html>